package com.sip.dbadapter.dao.base;

import java.io.Serializable;
import java.util.List;



import com.sip.dbadapter.dao.exception.CustomException;

public interface BaseDao<T, PK extends Serializable> {

    public Serializable save(T newInstance);

    void update(T transientObject);
    
    void saveOrUpdate(T transientObject);
    
    void saveOrUpdateAll(List<T> transientObjectCollection);

    void delete(T persistentObject);

    public List<T> find() throws CustomException;

    public List<T> find(String propertyName, Object value) throws CustomException;

    T findById(PK id) throws CustomException;

    public T search(String columnName, Object value);

    public Object exec(String query);
    
    public Object exec(String query,Object[] params);

}
